﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.LEDCorrective.Domain.LEDSender
{
    /// <summary>
    /// 单个墙体
    /// </summary>
    /// <remarks>
    /// #define	SCP_NAME_LEN		24
    /// struct _scp_wall_t
    /// {
    /// 	u_int32_t			id;						/*墙id*/
    /// 	u_int8_t			name[SCP_NAME_LEN];		/*墙的名称*/
    /// 	SCP_SCALE_t		scale;					/*墙规模*/
    /// 	SCP_RESOL_t		resol;					/*模组分辨率*/	
    /// 	u_int32_t			modpgNum;				/*模组个数*/
    /// 	SCP_WALLCONF_t	modpg[0];				/*模组信息*/
    /// }PACKED;
    /// typedef struct _scp_wall_t
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct SCP_WALL_T
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public UInt32 id;

        /// 墙信息
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)]
        public byte[] name;

        /// <summary>
        /// 墙规模
        /// </summary>
        public SCP_SCALE_T scale;

        /// <summary>
        /// 模组分辨率
        /// </summary>
        public SCP_RESOL_T resol;

        /// <summary>
        /// 模组个数
        /// </summary>
        public UInt32 modpgNum;

        /// 模组信息
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)]
        public SCP_WALLCONF_T[] modpg;
    }
}
